<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<base href="<%=basePath%>admin/sell/order/">
	<script type="text/javascript" src="<%=basePath%>admin/sell/js/jquery-1.4.2.min.js"></script>
	<script type="text/javascript" src="<%=basePath%>admin/sell/js/orderDetail.js"></script>
	<title>录入订单信息</title>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.STYLE1 {font-size: 12px}
.STYLE4 {
	font-size: 12px;
	color: #1F4A65;
	font-weight: bold;
}

a:link {
	font-size: 12px;
	color: #06482a;
	text-decoration: none;

}
a:visited {
	font-size: 12px;
	color: #06482a;
	text-decoration: none;
}
a:hover {
	font-size: 12px;
	color: #FF0000;
	text-decoration: underline;
}
a:active {
	font-size: 12px;
	color: #FF0000;
	text-decoration: none;
}
.STYLE7 {font-size: 12}

-->
</style>
<script>

var  highlightcolor='#eafcd5';
//此处clickcolor只能用win系统颜色代码才能成功,如果用#xxxxxx的代码就不行,还没搞清楚为什么:(
var  clickcolor='#51b2f6';
function  changeto(){
source=event.srcElement;
if  (source.tagName=="TR"||source.tagName=="TABLE")
return;
while(source.tagName!="TD")
source=source.parentElement;
source=source.parentElement;
cs  =  source.children;
//alert(cs.length);
if  (cs[1].style.backgroundColor!=highlightcolor&&source.id!="nc"&&cs[1].style.backgroundColor!=clickcolor)
for(i=0;i<cs.length;i++){
	cs[i].style.backgroundColor=highlightcolor;
}
}

function  changeback(){
if  (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="nc")
return
if  (event.toElement!=source&&cs[1].style.backgroundColor!=clickcolor)
//source.style.backgroundColor=originalcolor
for(i=0;i<cs.length;i++){
	cs[i].style.backgroundColor="";
}
}

function  clickto(){
source=event.srcElement;
if  (source.tagName=="TR"||source.tagName=="TABLE")
return;
while(source.tagName!="TD")
source=source.parentElement;
source=source.parentElement;
cs  =  source.children;
//alert(cs.length);
if  (cs[1].style.backgroundColor!=clickcolor&&source.id!="nc")
for(i=0;i<cs.length;i++){
	cs[i].style.backgroundColor=clickcolor;
}
else
for(i=0;i<cs.length;i++){
	cs[i].style.backgroundColor="";
}
}
</script>
</head>

<body>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="15" height="30"><img src="<%=basePath%>admin/tab/images/tab_03.gif" width="15" height="30" /></td>
        <td width="1101" background="<%=basePath%>admin/tab/images/tab_05.gif"><img src="<%=basePath%>admin/tab/images/311.gif" width="16" height="16" /> <span class="STYLE4">录入订单信息</span></td>
        <td width="281" background="<%=basePath%>admin/tab/images/tab_05.gif">&nbsp;</td>
        <td width="14"><img src="<%=basePath%>admin/tab/images/tab_07.gif" width="14" height="30" /></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="9" background="<%=basePath%>admin/tab/images/tab_12.gif">&nbsp;</td>
        <td bgcolor="#f3ffe3" class="STYLE1">&nbsp;&nbsp;&nbsp;
        <a href="#" onClick="history.back(); return false;">《《返 回列表</a>
        <form id="orderUpdateForm" action="updateOrder" method="post">
			<table width="60%" border="0" align="center" cellpadding="0" cellspacing="0"  onmouseover="changeto()"  onmouseout="changeback()">
			<!-- 添加内容 -->
			<tr>
	  			<td width="17%" height="25" align="center">订单编号：</td>
	  			<td>
	  				<input class="input" readonly="readonly" type="text" name="order.id" value="${order.id }"/>
			  	</td>
	  			<td width="15%"  height="25" align="right">订单时间：</td>
	  			<td>
	  				<input class="input" readonly="readonly" type="text" name="order.time" value="${order.time }"/>
			  	</td>
	  			<td width="17%"  height="25" align="center">经销商：</td>
	  			<td>
	  				<input readonly="readonly"  class="orderUpdate input" type="text" name="dealer.name" value="${order.dealer.name }"/>
			  	</td>
	  		</tr>
			<tr>
				<td colspan="6">
					<table id="objTable" border="0" width="80%" align="center" cellpadding="0" cellspacing="0">
						<tr align="center" style="width: 33%; height: 25px;">
				  			<td width="33%" background="<%=basePath%>admin/tab/images/tab_14.gif" class="STYLE1">产品名称</td>
				  			<td width="33%" background="<%=basePath%>admin/tab/images/tab_14.gif" class="STYLE1">产品规格</td>
				  			<td background="<%=basePath%>admin/tab/images/tab_14.gif" class="STYLE1">产品数量</td>
				  		</tr>
				  	<c:forEach items="${orderItem}" var="item">
						<tr align="center" style="width: 33%; height: 25px;">
				  			<td>
				  				<input style="width: 100%" readonly="readonly"  class="orderUpdate input" name="names" type="text" value="${item.goodsName }"/>
				  			</td>
				  			<td>
								<input style="width: 100%" readonly="readonly"  class="orderUpdate input" name="types" type="text" value="${item.goodsSpecification }"/>
							</td>
				  			<td>
				  				<input style="width: 100%" readonly="readonly"  class="orderUpdate input" type="text" name="nums" value="${item.number }" style="width: 95%;"/>
				  			</td>
				  		</tr>
				  </c:forEach>
					</table>
				</td>
			</tr>
	  		<tr>
	  			<td height="20" colspan="6">&nbsp;</td>
	  		</tr>
			<tr>
				<td width="60%" align="center" cellpadding="0" cellspacing="0" colspan="6">
					<table border="0" width="80%" align="center" cellpadding="0" cellspacing="0">
						<tr>
							<td width="50%" align="right">
			  					<input type="button" id="updateButton" value="修改"/>&nbsp;&nbsp;
			  				</td>
							<td width="50%" align="left">
	  							&nbsp;&nbsp;<input type="submit" value="提交"/>
	  						</td>
						</tr>
					</table>
	  			</td>
	  		</tr>
			</table>
		</form>
		</td>
		<td width="9" background="<%=basePath%>admin/tab/images/tab_16.gif">&nbsp;</td>
	</tr></table></td>
  </tr>
  <tr>
    <td height="29"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="15" height="29"><img src="<%=basePath%>admin/tab/images/tab_20.gif" width="15" height="29" /></td>
        <td background="<%=basePath%>admin/tab/images/tab_21.gif"><div align="right">&nbsp;</div>
		</td>
        <td width="14"><img src="<%=basePath%>admin/tab/images/tab_22.gif" width="14" height="29" /></td>
      </tr>
    </table></td>
  </tr>
</table>
</body>
</html>